/**
 * api管理
 */

import request from '../utils/request'
export default {
    login(params) {
        return request({ // request返回一个promise,所以必须return
            url: '/user/login',
            method: 'post',
            data: params,
        })
    },
    getNoticeCount(){
        return request({
            url: '/leave/count',
            method: 'get',
            data: {},
            mock: true
        })
    },
    getMenuList(){
        return request({
            url: '/menu/list',
            mehtod: 'get',
            data:{},
            mock: true
        })
    },
    getUserList(params){
        return request({
            url: '/users/list',
            method: 'get',
            data: params,
            mock: true
        })
    },
    userDel(params){
        return request({
            url: '/users/delete',
            method: 'post',
            data: params,
            mock: true
        })
    }
}